package com.app.repository.impl;
import com.app.model.main.ConsumeRecord;
import com.app.repository.interfaces.ConsumeRecordMapper;
import com.app.support.dao.MybatisDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;


/**
 * @author triplel
 * @create 2018-05-01 22:13
 */

@Repository
public class ConsumeRecordMapperImpl implements ConsumeRecordMapper {

    final String namespace = "com.app.dao.main.ConsumeRecordMapper";

    @Autowired
    private MybatisDao mybatisDao;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return mybatisDao.delete(namespace,".deleteByPrimaryKey",id);
    }

    @Override
    public int insert(ConsumeRecord record) {
        return mybatisDao.insert(namespace,".insert",record);
    }

    @Override
    public int insertSelective(ConsumeRecord record) {
        return mybatisDao.insert(namespace,".insertSelective",record);
    }

    @Override
    public ConsumeRecord selectByPrimaryKey(Long id) {
        return mybatisDao.get(namespace,".selectByPrimaryKey",id);
    }

    @Override
    public int updateByPrimaryKeySelective(ConsumeRecord record) {
        return mybatisDao.update(namespace,".updateByPrimaryKeySelective",record);
    }

    @Override
    public int updateByPrimaryKey(ConsumeRecord record) {
        return mybatisDao.update(namespace,".updateByPrimaryKey",record);
    }

    @Override
    public ConsumeRecord selectByFromIdAndToId(ConsumeRecord record) {
        return mybatisDao.get(namespace,".selectByFromIdAndToId",record);
    }

}
